package com.ruoyi.web.controller.tzzl;

import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.tzzl.domain.WzAdvertising;
import com.ruoyi.tzzl.service.IWzAdvertisingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 广告配置Controller
 * @author by caoyong
 * @date 2022/11/17
 **/
@RestController
@RequestMapping("/tzzl/advertising")
public class WzAdvertisingController extends BaseController {
    @Autowired
    private IWzAdvertisingService wzAdvertisingService;

    /**
     * 查看广告配置
     * */
    @GetMapping("/details")
    public AjaxResult details(){
     return AjaxResult.success(wzAdvertisingService.getById(1));
    }


    /**
     * 修改广告配置
     * */
    @PostMapping("/update")
    public AjaxResult update(@RequestBody WzAdvertising wzAdvertising){
        return AjaxResult.success(wzAdvertisingService.update(wzAdvertising));
    }


}
